
cc.Class({
    extends: cc.Component,

    properties: {
		_aid:-1,
		_bid:-1,
		alabel:cc.Label,
		blabel:cc.Label,
    },

    onLoad () {
		cc.director.on('choicepanel',(e)=>{
			cc.log('choicepanel===e.detail='+e.detail);
			if(e.detail == 49){
				this._aid = 50;
				this._bid = 59;
				this.alabel.string = '给他钱';
				this.blabel.string = '让他当魔王';
			}else if(e.detail == 86){
				this._aid = 87;
				this._bid = 89;
				this.alabel.string = '就这样成为同伴';
				this.blabel.string = '暂时不了';
			}else if(e.detail == 103){
				this._aid = 104;
				this._bid = 108;
				this.alabel.string = '放她走';
				this.blabel.string = '抓住她';
			}
		},this);

    },

    choiceA() {
		cc.log('choicepanel===choiceA='+this._aid);
		
		cc.director.emit('choicebtn',this._aid);
	},
	choiceB() {
		cc.log('choicepanel===choiceB='+this._bid);
		
		cc.director.emit('choicebtn',this._bid);
	},
	/*
_logid --A    ==B	
50	51	60
88	89	91
105	106	110
	*/
    // update (dt) {},
});
